# eric7.Plugins.VcsPlugins.vcsMercurial.ProjectBrowserHelper

Module implementing the VCS project browser helper for Mercurial.

### Global Attributes

None

### Classes

HgProjectBrowserHelper | Class implementing the VCS project browser helper for Mercurial.

### Functions

None

## HgProjectBrowserHelper

Class implementing the VCS project browser helper for Mercurial.

### Derived from

VcsProjectBrowserHelper

### Class Attributes

None

### Class Methods

None

### Methods

HgProjectBrowserHelper | Constructor
__HgAnnotate | Private slot called by the context menu to show the annotations of a file.
__HgAnnotateSkip | Private slot called by the context menu to show the annotations of a file with a project specific skip list.
__HgAnnotateSkipListFile | Private method to create an empty 'hg annotate' skip list file.
__HgConfigure | Private method to open the configuration dialog.
__HgCopy | Private slot called by the context menu to copy the selected file.
__HgExtendedDiff | Private slot called by the context menu to show the difference of a file to the repository.
__HgForget | Private slot called by the context menu to remove the selected file from the Mercurial repository leaving a copy in the project directory.
__HgMove | Private slot called by the context menu to move the selected file.
__HgReMerge | Private slot called by the context menu to re-merge a file.
__HgResolved | Private slot called by the context menu to mark conflicts of a file as being resolved.
__HgRevert | Private slot called by the context menu to revert changes made.
__HgSbsDiff | Private slot called by the context menu to show the difference of a file to the repository side-by-side.
__HgSbsExtendedDiff | Private slot called by the context menu to show the difference of a file to the repository side-by-side.
__HgUnresolved | Private slot called by the context menu to mark conflicts of a file as being unresolved.
__addBuiltinsMenu | Private method to add a 'Other Functions' menu entry.
__addExtensionsMenu | Private method to add an extension menu entry.
__showBuiltinsMenu | Private slot showing the 'Other Functions' menu.
__showExtensionMenu | Private slot showing the extensions menu.
__skipListFileName | Private method to generate the file name for a 'hg annotate' skip list file.
_addVCSMenu | Protected method used to add the VCS menu to all project browsers.
_addVCSMenuBack | Protected method used to add the VCS menu to all project browsers.
_addVCSMenuDir | Protected method used to add the VCS menu to all project browsers.
_addVCSMenuDirMulti | Protected method used to add the VCS menu to all project browsers.
_addVCSMenuMulti | Protected method used to add the VCS menu for multi selection to all project browsers.
showContextMenu | Public slot called before the context menu is shown.
showContextMenuDir | Public slot called before the context menu is shown.
showContextMenuDirMulti | Public slot called before the context menu is shown.
showContextMenuMulti | Public slot called before the context menu (multiple selections) is shown.

### Static Methods

None

#### HgProjectBrowserHelper (Constructor)

HgProjectBrowserHelper(vcsObject, browserObject, projectObject, isTranslationsBrowser, parent=None, name=None, )

Constructor

vcsObject (Hg)
  reference to the vcs object
browserObject (ProjectBaseBrowser)
  reference to the project browser object
projectObject (Project)
  reference to the project object
isTranslationsBrowser (bool)
  flag indicating, the helper is requested for the translations browser (this needs some special treatment)
parent (QWidget)
  parent widget
name (str)
  name of this object

#### HgProjectBrowserHelper.__HgAnnotate

__HgAnnotate()

Private slot called by the context menu to show the annotations of a file.

#### HgProjectBrowserHelper.__HgAnnotateSkip

__HgAnnotateSkip()

Private slot called by the context menu to show the annotations of a file with a project specific skip list.

#### HgProjectBrowserHelper.__HgAnnotateSkipListFile

__HgAnnotateSkipListFile()

Private method to create an empty 'hg annotate' skip list file.

#### HgProjectBrowserHelper.__HgConfigure

__HgConfigure()

Private method to open the configuration dialog.

#### HgProjectBrowserHelper.__HgCopy

__HgCopy()

Private slot called by the context menu to copy the selected file.

#### HgProjectBrowserHelper.__HgExtendedDiff

__HgExtendedDiff()

Private slot called by the context menu to show the difference of a file to the repository.

This gives the chance to enter the revisions to compare.

#### HgProjectBrowserHelper.__HgForget

__HgForget()

Private slot called by the context menu to remove the selected file from the Mercurial repository leaving a copy in the project directory.

#### HgProjectBrowserHelper.__HgMove

__HgMove()

Private slot called by the context menu to move the selected file.

#### HgProjectBrowserHelper.__HgReMerge

__HgReMerge()

Private slot called by the context menu to re-merge a file.

#### HgProjectBrowserHelper.__HgResolved

__HgResolved()

Private slot called by the context menu to mark conflicts of a file as being resolved.

#### HgProjectBrowserHelper.__HgRevert

__HgRevert()

Private slot called by the context menu to revert changes made.

#### HgProjectBrowserHelper.__HgSbsDiff

__HgSbsDiff()

Private slot called by the context menu to show the difference of a file to the repository side-by-side.

#### HgProjectBrowserHelper.__HgSbsExtendedDiff

__HgSbsExtendedDiff()

Private slot called by the context menu to show the difference of a file to the repository side-by-side.

It allows the selection of revisions to compare.

#### HgProjectBrowserHelper.__HgUnresolved

__HgUnresolved()

Private slot called by the context menu to mark conflicts of a file as being unresolved.

#### HgProjectBrowserHelper.__addBuiltinsMenu

__addBuiltinsMenu(menu, key)

Private method to add a 'Other Functions' menu entry.

menu (QMenu)
  menu to add it to
key (str)
  menu key (one of 'mainMenu', 'multiMenu', 'backMenu', 'dirMenu' or 'dirMultiMenu')

Return:
  reference to the menu action

Return Type:
  QAction

#### HgProjectBrowserHelper.__addExtensionsMenu

__addExtensionsMenu(menu, key)

Private method to add an extension menu entry.

menu (QMenu)
  menu to add it to
key (str)
  menu key (one of 'mainMenu', 'multiMenu', 'backMenu', 'dirMenu' or 'dirMultiMenu')

Return:
  reference to the menu action

Return Type:
  QAction

#### HgProjectBrowserHelper.__showBuiltinsMenu

__showBuiltinsMenu(key, controlled)

Private slot showing the 'Other Functions' menu.

key (str)
  menu key (one of 'mainMenu', 'multiMenu', 'backMenu', 'dirMenu' or 'dirMultiMenu')
controlled (bool)
  flag indicating to show the menu for a version controlled entry or a non-version controlled entry

#### HgProjectBrowserHelper.__showExtensionMenu

__showExtensionMenu(key, controlled)

Private slot showing the extensions menu.

key (str)
  menu key (one of 'mainMenu', 'multiMenu', 'backMenu', 'dirMenu' or 'dirMultiMenu')
controlled (bool)
  flag indicating to show the menu for a version controlled entry or a non-version controlled entry

#### HgProjectBrowserHelper.__skipListFileName

__skipListFileName()

Private method to generate the file name for a 'hg annotate' skip list file.

Return:
  name of the skip list file

Return Type:
  str

#### HgProjectBrowserHelper._addVCSMenu

_addVCSMenu(mainMenu)

Protected method used to add the VCS menu to all project browsers.

mainMenu (QMenu)
  reference to the menu to be amended

#### HgProjectBrowserHelper._addVCSMenuBack

_addVCSMenuBack(mainMenu)

Protected method used to add the VCS menu to all project browsers.

mainMenu (QMenu)
  reference to the menu to be amended

#### HgProjectBrowserHelper._addVCSMenuDir

_addVCSMenuDir(mainMenu)

Protected method used to add the VCS menu to all project browsers.

mainMenu (QMenu)
  reference to the menu to be amended

#### HgProjectBrowserHelper._addVCSMenuDirMulti

_addVCSMenuDirMulti(mainMenu)

Protected method used to add the VCS menu to all project browsers.

mainMenu (QMenu)
  reference to the menu to be amended

#### HgProjectBrowserHelper._addVCSMenuMulti

_addVCSMenuMulti(mainMenu)

Protected method used to add the VCS menu for multi selection to all project browsers.

mainMenu (QMenu)
  reference to the menu to be amended

#### HgProjectBrowserHelper.showContextMenu

showContextMenu(_menu, standardItems)

Public slot called before the context menu is shown.

It enables/disables the VCS menu entries depending on the overall VCS status and the file status.

_menu (QMenu)
  reference to the menu to be shown (unused)
standardItems (list of QAction)
  array of standard items that need activation/deactivation depending on the overall VCS status

#### HgProjectBrowserHelper.showContextMenuDir

showContextMenuDir(_menu, standardItems)

Public slot called before the context menu is shown.

It enables/disables the VCS menu entries depending on the overall VCS status and the directory status.

_menu (QMenu)
  reference to the menu to be shown (unused)
standardItems (list of QAction)
  array of standard items that need activation/deactivation depending on the overall VCS status

#### HgProjectBrowserHelper.showContextMenuDirMulti

showContextMenuDirMulti(_menu, standardItems)

Public slot called before the context menu is shown.

It enables/disables the VCS menu entries depending on the overall VCS status and the directory status.

_menu (QMenu)
  reference to the menu to be shown (unused)
standardItems (list of QAction)
  list of standard items that need activation/deactivation depending on the overall VCS status

#### HgProjectBrowserHelper.showContextMenuMulti

showContextMenuMulti(_menu, standardItems)

Public slot called before the context menu (multiple selections) is shown.

It enables/disables the VCS menu entries depending on the overall VCS status and the files status.

_menu (QMenu)
  reference to the menu to be shown (unused)
standardItems (list of QAction)
  array of standard items that need activation/deactivation depending on the overall VCS status

Up